package com.itcast.plane.modoule.wx.controller;

import com.itcast.plane.modoule.wx.dto.WxLoginDTO;
import com.itcast.plane.modoule.wx.dto.WxPhoneDTO;
import com.itcast.plane.modoule.wx.service.WxService;
import com.itcast.plane.util.JsonResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/wx")
public class WxController {

    @Resource
    private WxService wxService;

    @PostMapping("/login")
    public JsonResult wxLogin(@RequestBody WxLoginDTO loginDTO){
        return wxService.wxLogin(loginDTO);
    }

    @PostMapping("/phone")
    public JsonResult phone(@RequestBody WxPhoneDTO phoneDTO){
        return wxService.phone(phoneDTO);
    }
}
